//-----------------------------------------------------------------------------
// File: xdebug.h
//
// Desc: debug utility.
//       Build20070218
//
// Author: Silva Lam
//-----------------------------------------------------------------------------
#ifndef _XDEBUG_H_
#define _XDEBUG_H_
#include "xtypes.h"
#include "xaux.h"
#include "xstring.h"

inline void xMarkBreakPoint()
{
	__asm int 3;
}


#ifdef _DEBUG
#define xDebugAssert(_Expression) (void)( (!!(_Expression)) || (xMarkBreakPoint(), 0) )
#else
#define xDebugAssert(_Expression) ((void)0)
#endif

#define xDebugReportException() \
		{\
		CxString strError;\
		strError.format("EXCEPTION OCCUR @ %s - %s - LINE: %d\n", __FILE__, __FUNCTION__, __LINE__);\
		xLogFile(strError.c_str());\
		throw -1;\
		};0




#endif //_XDEBUG_H_
